//
//  Database.h
//  FMDBTest
//
//  Created by  on 12-3-27.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>

#define DB_NAME @"study.db"

@class FMDatabase;
@interface Database : NSObject
{
    FMDatabase *db;
}
+ (Database*)sharedManager;

- (NSArray *)querySecondCitys:(int)area_id;
- (NSArray *)queryCitys:(int)area_id;
- (NSArray *)searchCitys:(NSString *)str;
- (NSString *)queryCityCode:(NSString *)cityName;

- (BOOL)saveAreaData:(NSDictionary *)dic;
//首页信息保存
- (BOOL)saveMaster:(NSDictionary *)dic1;
//首页信息保存
- (BOOL)saveMasterOutline:(NSDictionary *)dic1;
//会话设置已读，即消息个数置0
- (BOOL)updateMasterData:(NSString *)sessionID;
//用于订单显示红点
- (int)queryMsgSum:(NSString *)consultationId;

- (BOOL)saveMessage:(NSDictionary *)dic;
- (BOOL)saveMessageOutline:(NSDictionary *)dic;
- (NSArray *)queryMsgData:(NSString *)sessionID;



@end
